home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10492 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.7 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help !!!!! on 'strstr"
  5. Date: 14 Mar 96 18:07:32 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.826826852@rscernix>
  8. References: <314703FF.4045@msmail.st.stems.com> <jodellDo7097.Bto@netcom.com> <TANMOY.96Mar13090926@qcd.lanl.gov> <3147C7AC.6EE3@hsc.unt.edu>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <3147C7AC.6EE3@hsc.unt.edu> Steve Fogoros <sfogoros@hsc.unt.edu> writes:
  13.  
  14. >Tanmoy Bhattacharya wrote:
  15. >
  16. >> Any user function whose name begins with `is' followed by a lower case
  17. >> letter violates the ANSI C standard.
  18. >
  19. >You mentioned the same kind of violation regarding user functions that start with
  20. >'str' followed by lower case letter in another post. I apologize that I question
  21. >this without being intimately familiar with ANSI C Standard. I am having a hard time
  22. >believing the standard would consider my use of other than reserved words a violation.
  23. >(What kind of ticket would I get for an infraction? Is the implementation required to
  24. >check for this and warn or error?)
  25.  
  26. No.  This kind of "infraction" invokes undefined behaviour and the 
  27. compiler is free to do anything it wants.
  28.  
  29. >Seriously, I will look this up because it seems strange to me and I didn't know
  30. >anything about it. I quick scanned my K&R2 but did not find anything there.
  31.  
  32. Here's the complete list of reserved external names.
  33.  
  34.     4.13 FUTURE LIBRARY DIRECTIONS
  35.  
  36.        The following names are grouped under individual headers for
  37.     convenience.  All external names described below are reserved no
  38.     matter what headers are included by the program.     ^^^^^^^^
  39.  
  40.  
  41.     4.13.1 Errors <errno.h>
  42.  
  43.        Macros that begin with E and a digit or E and an upper-case letter
  44.     (followed by any combination of digits, letters and underscore) may be
  45.     added to the declarations in the <errno.h> header.
  46.  
  47.  
  48.     4.13.2 Character handling <ctype.h>
  49.  
  50.        Function names that begin with either is or to , and a lower-case
  51.     letter (followed by any combination of digits, letters and underscore)
  52.     may be added to the declarations in the <ctype.h> header.
  53.  
  54.  
  55.     4.13.3 Localization <locale.h>
  56.  
  57.        Macros that begin with LC_ and an upper-case letter (followed by
  58.     any combination of digits, letters and underscore) may be added to the
  59.     definitions in the <locale.h> header.
  60.  
  61.  
  62.     4.13.4 Mathematics <math.h>
  63.  
  64.        The names of all existing functions declared in the <math.h>
  65.     header, suffixed with f or l , are reserved respectively for
  66.     corresponding functions with float and long double arguments and
  67.     return values.
  68.  
  69.  
  70.     4.13.5 Signal handling <signal.h>
  71.  
  72.        Macros that begin with either SIG and an upper-case letter or SIG_
  73.     and an upper-case letter (followed by any combination of digits,
  74.     letters and underscore) may be added to the definitions in the
  75.     <signal.h> header.
  76.  
  77.  
  78.     4.13.6 Input/output <stdio.h>
  79.  
  80.        Lower-case letters may be added to the conversion specifiers in
  81.     fprintf and fscanf .  Other characters may be used in extensions.
  82.  
  83.  
  84.     4.13.7 General utilities <stdlib.h>
  85.  
  86.        Function names that begin with str and a lower-case letter
  87.     (followed by any combination of digits, letters and underscore) may be
  88.     added to the declarations in the <stdlib.h> header.
  89.  
  90.  
  91.     4.13.8 String handling <string.h>
  92.  
  93.        Function names that begin with str , mem , or wcs and a lower-case
  94.     letter (followed by any combination of digits, letters and underscore)
  95.     may be added to the declarations in the <string.h> header. 
  96.  
  97. Dan
  98. --
  99. Dan Pop
  100. CERN, CN Division
  101. Email: danpop@mail.cern.ch 
  102. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  103.